Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Federation: separate notion of zone-name & dns-suffix #35372

Merged

Conversation

justinsb
Copy link
Member

@justinsb justinsb commented Oct 22, 2016

We can put subdomains into hosted zones (for example,
foo.federation.example.com can be hosted in example.com)

By allowing sharing a common hosted zone, this means the user doesn't
have to do as much setup.


This change is Reviewable

@justinsb
Copy link
Member Author

This is splitting #34901 into logical parts. I haven't found a test that covers the generated DNS names yet, but I expect e2e will find it for me :-)

cc @quinton-hoole @madhusudancs

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Oct 22, 2016
@justinsb justinsb force-pushed the federation_dns_hosted_zone_1 branch 2 times, most recently from 19cb087 to 2f7ea65 Compare October 23, 2016 15:28
@justinsb
Copy link
Member Author

Now with unit test :-)

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 23, 2016
@justinsb
Copy link
Member Author

ping @quinton-hoole / @madhusudancs

@@ -39,6 +39,8 @@ type ControllerManagerConfiguration struct {
FederationName string `json:"federationName"`
// zone name, like example.com.
ZoneName string `json:"zoneName"`
// suffix to use for publishing federated services.
FederationDnsSuffix string `json:"federationDnsSuffix"`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: It's a suffix to the service name, but a prefix to the DNS zone. Somewhat confusing, perhaps. I'd suggest either adding an example to clarify, or renaming it something like DNSSubZone?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about ServiceDnsSuffix? I think that is unambiguous?

(DNSSubZone ambiguity: I'm not sure if that would include ZoneName)

@@ -101,6 +103,7 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
fs.Var(componentconfig.IPVar{Val: &s.Address}, "address", "The IP address to serve on (set to 0.0.0.0 for all interfaces)")
fs.StringVar(&s.FederationName, "federation-name", s.FederationName, "Federation name.")
fs.StringVar(&s.ZoneName, "zone-name", s.ZoneName, "Zone name, like example.com.")
fs.StringVar(&s.FederationDnsSuffix, "federation-dns-suffix", s.FederationDnsSuffix, "DNS Suffix to use for federation domain names.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per above comment

func getDnsZone(dnsZoneName string, dnsZonesInterface dnsprovider.Zones) (dnsprovider.Zone, error) {
dnsZones, err := dnsZonesInterface.List()
// getDnsZone returns the zone, as identified by zoneName
func (s *ServiceController) getDnsZone() (dnsprovider.Zone, error) {
Copy link

@ghost ghost Oct 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like making this is member function of ServiceController. It has nothing to do with service controllers. If anything it should be a member of DNSZone, or a util function. Can we revert the function signature back to what it was?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure... it's because in the next PR we'll add ID as well, but we can look at that when we come to it. I agree with you; it's not clear that even when we add ID is should be on ServiceController

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM barring minor nits. Feel free to apply the label once done.

@justinsb
Copy link
Member Author

Applied the changes & fixed, but I don't want to apply lgtm until we figure out the right name for the dns suffix flag, because it's really hard to change later (and so easy to change now!)

Right now we have service-dns-suffix, do you like that @quinton-hoole ?

@k8s-ci-robot
Copy link
Contributor

Jenkins verification failed for commit cb3269e9b8d26a80af950059e154daed109237c7. Full PR test history.

The magic incantation to run this job again is @k8s-bot verify test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

We can put subdomains into hosted zones (for example,
foo.federation.example.com can be hosted in example.com)

By allowing sharing a common hosted zone, this means the user doesn't
have to do as much setup.
@ghost
Copy link

ghost commented Nov 1, 2016

Yeah, that's fine @justinsb . Thanks for your patience on this one. LGTM.
Please feel free to prod me if I'm holding you up on any other reviews. Does #34901 still need review?

@ghost ghost added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 1, 2016
@k8s-github-robot k8s-github-robot added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Nov 1, 2016
@justinsb justinsb added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Nov 2, 2016
@justinsb
Copy link
Member Author

justinsb commented Nov 2, 2016

Thanks @quinton-hoole . #34901 is the "big picture", but once this merges I'll split out the next piece which is to enable zone selection by id or name. I've assigned it to myself for now.

The third piece is to batch updates, which I think is useful, but just "icing on the cake". I guess we'll see where we are once after PR 2/3. I'll also see if we're hitting the delays - if so it might be more important.

@justinsb justinsb removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Nov 4, 2016
@justinsb
Copy link
Member Author

justinsb commented Nov 4, 2016

Manually removing do-not-merge. I think merge bot added it because of the lack of the label, but then deleted its comment but not the label :-(

@justinsb justinsb added this to the v1.5 milestone Nov 5, 2016
@justinsb justinsb added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Nov 5, 2016
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants